Heap Compression and Binary I/O in Haskell
نویسندگان
چکیده
Two new facilities for Haskell are described: compression of data values in memory, and a new scheme for binary I/O. These facilities, although they can be used individually, can also be combined because they use the same binary representations for values. Heap compression in memory is valuable because it enables programs to run on smaller machines, or conversely allows programs to store more data in the same amount of memory. Binary I/O is valuable because it makes the file storage and retrieval of heap data structures smooth and painless. The combination of heap compression and binary I/O allows data transfer to be both fast and space-efficient. All the facilities described have been implemented in a variant of Röjemo’s nhc compiler. Example applications are demonstrated, with performance results for space and speed.
منابع مشابه
The Bits Between The Lambdas : Binary Data in a Lazy Functional
For the programmer, storage media are usually assumed to have a minimum atomic unit of transfer of one byte. However , sometimes it is useful to have an even ner storage granularity of one bit, for instance in order to compress data. This paper describes an API in the lazy functional language Haskell for treating storage media as arbitrary-length streams of bits, without byte-alignment constrai...
متن کاملLZW Text Compression in Haskell
Functional programming is largely untested in the industrial environment. This paper summarises the results of a study into the suitability of Haskell in the area of text compression, an area with deenite commercial interest. Our program initially performs very poorly in comparison with a version written in C. Experiments reveal the cause of this to be the large disparity in the relative speed ...
متن کاملComparator Networks for Binary Heap Construction
Comparator networks for constructing binary heaps of size n are presented which have size O(n log log n) and depth O(log n). A lower bound of n log log n ?O(n) for the size of any heap construction network is also proven, implying that the networks presented are within a constant factor of optimal. We give a tight relation between the leading constants in the size of selection networks and in t...
متن کاملStrengthened Lazy Heaps: Surpassing the Lower Bounds for Binary Heaps
Let n denote the number of elements currently in a data structure. An in-place heap is stored in the first n locations of an array, uses O(1) extra space, and supports the operations: minimum , insert , and extract -min. We introduce an in-place heap, for which minimum and insert take O(1) worst-case time, and extract -min takes O(lg n) worst-case time and involves at most lg n+O(1) element com...
متن کاملO(log log N) Time Algorithms for Hamiltonian-Suffix and Min-Max-Pair Heap Operations on Hypercube Multicomputers
We present an efficient mapping of a min-max-pair heap of size N on a hypercube multicomputer of p processors in such a way the load on each processor’s local memory is balanced and no additional communication overhead is incurred for implementation of the single insertion, deletemin and deletemax operations. Our novel approach is based on an optimal mapping of the paths of a binary heap into a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997